package Cars.Models;

public class Car extends BaseModel{
    private static final String ChangeFirst = "别克商务舱GL8";
    private static final String ChangeSecond = "宝马550i";
    private static final String ChangeThird = "别克林荫大道";

    @Override
    public void setType(int type) throws Exception {
        switch (type){
            case 1:{
                this.type = ChangeFirst;
                setPrice(600.00F);
                break;
            }
            case 2:{
                this.type=ChangeSecond;
                setPrice(500.00F);
                break;
            }
            case 3:{
                this.type=ChangeThird;
                setPrice(300.00F);
                break;
            }
            default:{
                throw new Exception("");
            }
        }
    }

}
